﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DropBoxTool.Model;
using SharpDropBoxClient;

namespace DropBoxTool
{
    public class DropBoxController
    {
        // Moved the settings to the Settings class (tired of accidently publishing my keys)

        #region Singleton pattern From Jon Skeet - http://www.yoda.arachsys.com/csharp/singleton.html

        static readonly DropBoxController instance = new DropBoxController();

        // Explicit static constructor to tell C# compiler
        // not to mark type as beforefieldinit
        static DropBoxController()
        {
        }

        DropBoxController()
        {
            Api = new DropBoxApp(DropBoxSettings.kApiKey, DropBoxSettings.kApiSecret);
        }

        public static DropBoxController Inst
        {
            get
            {
                return instance;
            }
        }

        #endregion Singleton pattern From Jon Skeet - http://www.yoda.arachsys.com/csharp/singleton.html

        public DropBoxApp Api
        {
            get;
            set;
        }
    }
}